<template>
  <div class="dashboard-container">
    <component :is="currentRole" ></component>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'
import adminDashboard from './admin/index'
import { ORDER } from "@/const/orderConst.js";
import apiBase from "@/api/apiBase.js";
// import editorDashboard from './editor/index'

export default {
  name: 'dashboard',
  components: { adminDashboard},
  data() {
    return {
      currentRole: 'adminDashboard',
      // loading2: true
    }
  },
  computed: {
    ...mapGetters([
      'roles'
    ])
  },
  created() {
    this.currentRole = 'adminDashboard';
    let data = {};
    apiBase.DoService(
        data,
        apiBase.getApiAdress().Param.GetIsDataTableReddening,
        res => {
            ORDER.ischangered = res.data.content; 
        }
    );
    apiBase.DoService(
        data,
        apiBase.getApiAdress().Param.GetIsCreChangeRed,
        res => {
            ORDER.ischangnb = res.data.content; 
        }
    );

  }
}
</script>
